//
//  MRMData.m
//  MeiRiMoney
//
//  Created by qiuqk on 13-7-13.
//  Copyright (c) 2013年 MeiRiCai. All rights reserved.
//

#import "MRMData.h"
#import "MRMSdk.h"

@implementation MRMData

+ (BOOL) isEnabledWall
{
	static BOOL _first = true;
	static BOOL _isEnabledWall = true;
	
	if (_first) {
		NSString *version = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"];
		NSString *isEnabledWall_Key = [NSString stringWithFormat:@"iOS_IsEnabledWall_%@", version];
		GSetting *gSetting = [MRMSdk getGSetting:isEnabledWall_Key];
		
		if (gSetting != nil && ![gSetting.Value isEqual: @"1"]) {
			_isEnabledWall = false;
		}
		
		_first = false;
	}
	
	return _isEnabledWall;
}

+ (NSArray *) getCommodities
{
	NSMutableArray *commodities = [[NSMutableArray alloc] init];
	MRMCommodity *commodity = [[MRMCommodity alloc] init];
	commodity.Id = 1;
	commodity.Category = 1;
	commodity.Name = @"话费充值卡10元";
	commodity.Integral = 1000;
	commodity.Price = 10;
	commodity.ImageName = @"话费充值卡-10元.png";
	
	[commodities addObject:commodity];
	
	commodity = [[MRMCommodity alloc] init];
	commodity.Id = 2;
	commodity.Category = 2;
	commodity.Name = @"支付宝提现5元";
	commodity.Integral = 500;
	commodity.Price = 5;
	commodity.ImageName = @"支付宝提现-5元.png";
	
	[commodities addObject:commodity];
	
	commodity = [[MRMCommodity alloc] init];
	commodity.Id = 3;
	commodity.Category = 1;
	commodity.Name = @"话费充值卡20元";
	commodity.Integral = 2000;
	commodity.Price = 20;
	commodity.ImageName = @"话费充值卡-20元.png";
	
	[commodities addObject:commodity];
	
	commodity = [[MRMCommodity alloc] init];
	commodity.Id = 4;
	commodity.Category = 2;
	commodity.Name = @"支付宝提现10元";
	commodity.Integral = 1000;
	commodity.Price = 10;
	commodity.ImageName = @"支付宝提现-10元.png";
	
	[commodities addObject:commodity];
	
	return commodities;
}

@end
